Running the loop from an overlay

's main loop is very simple. It looks for a keyboard or mouse event and then processes it. Overlay functions allow you to run this loop remotely from the overlay. You can load the overlay once and leave it loaded while still using . This saves the overhead of loading the overlay program each time you want to use one of its functions.

The ``get user input event'' function (ax=26) gets the next input event. You can choose to handle the event yourself, or you can pass it back to for handling. Do this with the ``handle input event'' function (ax=27).

Sometimes you will want to execute a function for which there is not an overlay interface call. The ``execute command'' function (ax=25) will execute any command.